package com.tdh.tlgusers.mapper;

import com.tdh.tlgusers.pojo.Address;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface AddressMapper {
    /**
     * 查询收货地址
     * @param userId 用户id
     * @return
     */
    List<Address> selAddress(Integer userId);

    /**
     * 添加收货地址
     * @param address
     * @return
     */
    int addAddress(Address address);

    /**
     * 修改收货地址
     * @param address
     * @return
     */
    int modifyAddress(Address address);

    /**
     * 删除收货地址
     * @param addressId 收货地址id
     * @return
     */
    int deleteAddress(Integer addressId);
}
